<?php
/**
 * indexcontroller.php
 * Create on 2016-05-26 15:46:05
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\index;

use \haibao\cms\business\control\pc\action\ArticleAction;
use \haibao\cms\business\control\pc\action\ImageCollectiveAction;

class IndexController extends \haibao\cms\business\control\pc\channel\ChannelController{

	public function __construct($updateTime = null,$controlId,$isPublish){

		$this->savaLog();
		parent::__construct($updateTime,$controlId,$isPublish);
		$this->initArticleAction();
		$this->initImageCollectiveAction();
	}
	
	
	public function getWordLinkList($autoData,$channel = ''){
		
		$wordLinkList = array();
		if($autoData){
			foreach($autoData as $data){
				
				array_push($wordLinkList,json_decode($data['ParameterValue'],true));
			}
		}
		if($channel){
			$temp = array('wordUrl'=>$channel,'wordTitle'=>'更多>>');
			array_push($wordLinkList,$temp);
		}
		return $wordLinkList;
	}
	private function initArticleAction(){
		$this->articleAction = ArticleAction::initArticleAction();
	}
	
	private function initImageCollectiveAction(){
	    $this->imageCollectiveAction = ImageCollectiveAction::initImageCollectiveAction();
	}
	
	
}